﻿using EkStudio.com.bean.xml.reflection;
using EkStudio.com.bean.xml.RootInterface;
using System;

namespace EkStudio.com.bean.xml.WorkFlow.Node
{
    public class WflowMessageElement: BillObjectInterface
    {
        private bool enable = true;
        private bool mailEnable = false;
        private WflowExpressionElement performer = null;
        private WflowExpressionElement title = null;
        private WflowExpressionElement content = null;

        [Xml]
        public bool Enable
        {
            get { return enable; }
            set { enable = value; }
        }
        [Xml]
        public bool MailEnable
        {
            get { return mailEnable; }
            set { mailEnable = value; }
        }
        [XmlElement]
        public WflowExpressionElement Performer
        {
            get { return performer; }
            set { performer = value; }
        }

        [XmlElement]
        public WflowExpressionElement Title
        {
            get { return title; }
            set { title = value; }
        }


        [XmlElement]
        public WflowExpressionElement Content
        {
            get { return content; }
            set { content = value; }
        }


        [XmlTransient]
        public object ParentBean
        {
            get
            {
                return null;
            }

            set
            {
                
            }
        }

        public object Clone()
        {
            WflowMessageElement clone = new WflowMessageElement();
            clone.Enable = enable;
            clone.MailEnable = mailEnable;
            clone.Performer = performer.Clone() as WflowExpressionElement;
            clone.Title = title.Clone() as WflowExpressionElement;
            clone.Content = content.Clone() as WflowExpressionElement;
            return clone;
        }
    }
}